﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BusinessLogic.Controller;
using BusinessLogic.Helper;
using JScripter;

public partial class AjaxPages_User_ChangePassword : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void UpdatePassword_Click(object sender, AjaxControl.AjaxEventArg e)
    {
        var data=new LoginUserController().GetbyLoginID(new LoginHelper().LoginID);
        string confirmpassword=HtmlHelper.ControlValue(txtConfirmPassword.ClientID);
        if (data[0].Password == confirmpassword)
        {
            data[0].Password=HtmlHelper.ControlValue(txtnewpassword.ClientID);
            new LoginUserController().UpdateByLoginID(data[0]);
        }
    }
}